@(tasks: List[Task], taskForm: Form[Task])

@import helper._

@main("Todo list") {
    <h3>@tasks.size() task(s)</h3>
    <ul>
        @for(task <- tasks) {
            <li>
                @task.label
                
                @form(routes.Application.deleteTask(task.id)) {
                    <input class="btn btn-default btn-sm" type="submit" value="Delete">
                }
            </li>
        }
    </ul>
    
    <h4>Add a new task</h4>
    
    @form(routes.Application.newTask()) {
        
        @inputText(taskForm("label")) 
        
        <input class="btn btn-default btn-sm" type="submit" value="Create">
        
    }
    
}